1. Field of the Invention
This invention relates to a data reproducing apparatus and method suitably used to reproduce a disk on which image data are recorded digitally, and more particularly to a data reproducing apparatus and method which reproduces a disk on which moving picture data compressed at a variable rate are recorded.
2. Description of the Related Art
When moving pictures are recorded and reproduced digitally, since a very large amount of data are involved, a technique of compressing data is used. FIG. 1 shows construction of an exemplary apparatus which records and reproduces a moving picture in a compressed form.
Referring to FIG. 1, a video signal outputted from a video camera 1 is converted from an analog signal into a digital signal by an analog to digital (A/D) converter 2 and is then stored in a frame memory 3. The data stored in the frame memory 3 are then read out from the frame memory 3 and input to a DCT (discrete cosine transform) circuit 5. The DCT circuit 5 DCT processes the input data. Data output from the DCT circuit 5 are input to and quantized by a quantizing circuit 6 and are then input to a VLC (variable length coder) circuit 7, at which they are converted into variable length codes such as Huffman codes. The variable length codes from the VLC circuit 7 are supplied to and stored in a video code buffer 8.
The data quantized by the quantizing circuit 6 are supplied, when they are data of an I picture (intra-coded image) or a P picture (forward predictive coded image), to and inversely quantized by an inverse quantizing circuit 10. The data inversely quantized by the inverse quantizing circuit 10 are input to an IDCT (inverse discrete cosine transform) circuit 11, at which they are IDCT processed. Output data from the IDCT circuit 11 are supplied by way of an adder 12 to and stored in a frame memory 13.
Meanwhile, a movement detecting circuit 14 detects a movement of an image stored in the frame memory 3 and outputs such movement vector to the VLC circuit 7 and a movement compensating circuit 15. The movement compensating circuit 15 compensates for movement of the data stored in the frame memory 13 corresponding to the movement vector and outputs the thus compensated data to a subtractor 4 and the adder 12. The subtractor 4 subtracts the data input thereto from the movement compensating circuit 15 from the data input thereto from the frame memory 3. Consequently, a P picture is produced using as a predictive image (a reference image with reference to which a difference should be taken) an I picture of a P picture which is positioned forwardly in time and already decoded, or a B picture (bi-directional predictive coded image) is produced using as predictive images three images including an I picture or a P picture which is positioned forwardly in time and already decoded, another I picture or another P picture which is positioned rearwardly in time and already decoded and an interpolation image produced from the two pictures. An I picture is produced when only data output from the frame memory 3 are supplied to the DCT circuit 5 without making use of data from the movement compensating circuit 15.
The adder 12 adds the movement compensated data received from the movement compensating circuit 15 and the data supplied from the IDCT circuit 11 to produce a decoded image of an I picture, a P picture or a B picture and supplies the thus produced image to the frame memory 13 so that it is stored in the frame memory 13. This means that image data obtained by decoding the same data as the data which have been quantized by the quantizing circuit 6 and supplied to the video code buffer 8 by way of the VLC circuit 7 are stored in the frame memory 13. As a result, it is possible to obtain data of a P picture or a B picture making use of the stored in the frame memory 13.
Meanwhile, a rate controller 9 monitors an amount of data stored in the video code buffer 8 and adjusts the quantizing step size of the quantizing circuit 6 so that the stored amount will not overflow or underflow. Consequently, the bit rate Rv at which data are supplied from the VLC circuit 7 to the video code buffer 8 is varied so that an otherwise possible overflow or underflow of the video code buffer 8 is prevented.
Then, the data stored in the video code buffer 8 in this manner are transferred at a fixed transfer rate to and written onto an optical disk 16. The encoder section of the recording and reproducing apparatus is constructed in the manner as described so far.
Subsequently, construction and operation of the decoder section of the recording and reproducing apparatus will be described. In the decoder section, data reproduced from the optical disk 16 are transferred at a fixed transfer rate to and stored into a video code buffer 21. Data read out from the video code buffer 21 are supplied to an IVLC (inverse variable length coder) circuit 22, at which they are IVLC processed. After completion of such IVLC processing of the input data, the IVLC circuit 22 supplies the data to an inverse quantizing circuit 23. Then, the IVLC circuit 22 outputs a code request to the video code buffer 21 to request transfer of new data.
When such code request is received, the video code buffer 21 transfers new data to the IVLC circuit 22. The transfer rate Rv then is set to a value equal to the bit rate at which data are transferred from the VLC circuit 7 to the video code buffer 8 in the encoder section so that the video code buffer 21 may not overflow or underflow when data are transferred at a fixed transfer rate from the optical disk 16 to the video code buffer 21. In other words, the bit rate in the encoder section is set so that the video code buffer 21 in the decoder section will not overflow or underflow.
The inverse quantizing circuit 23 inversely quantizes the data supplied from the IVLC circuit 22 in accordance with data of the quantizing step size supplied thereto from the IVLC circuit 22. The quantizing step size and a movement vector which is supplied from the IVLC circuit 22 to a movement compensating circuit 26 are supplied from the rate controller 9 and the movement detecting circuit 14 to the VLC circuit 7 and recorded onto the optical disk 16 by way of the video code buffer 8 together with image data in the encoder section and then reproduced from the optical disk 16.
An IDCT circuit 24 IDCT processes the data supplied thereto from the inverse quantizing circuit 23. In case the data thus IDCT processed are I picture data, they are supplied as they are to and stored in a frame memory 27 by way of an adding circuit 25. On the other hand, in case the data output from the IDCT circuit 24 are P picture data for which an I picture is a predictive image, I picture data are read out from the frame memory 27 and are movement compensated by the movement compensating circuit 26, whereafter they are supplied to the adding circuit 25. The adding circuit 25 adds the data output from the IDCT circuit 24 and the data output from the movement compensating circuit 26 to produce P picture data. Also the data thus produced are stored in the frame memory 27.
On the other hand, in case the data output from the IDCT circuit 24 are data of a B picture, I picture data or P picture data are read out from the frame memory 27 and then movement compensated by the movement compensating circuit 26. Whereafter they are supplied to the adding circuit 25. The adding circuit 25 adds the data output from the IDCT circuit 24 and the data received from the movement compensating circuit 26 so that decoded B picture data are obtained. Also the data are stored in the frame memory 27.
The data stored in the frame memory 27 in this manner are converted from digital values into analog values by a digital to analog (D/A) converter 28 and then supplied to and displayed on a display 29.
In this manner, the redundancy in a frame is reduced by DCT processing and the redundancy between frames is reduced using a movement vector, and a high compression ratio is realized by a combination of techniques.
In the conventional recording and reproducing apparatus, data are transferred at a fixed rate from the optical disk 16 to the video code buffer 21 in this manner. In this instance, the quantizing step size of the quantizing circuit 6 is controlled in advance in accordance with a stored amount of data in the video code buffer 8 of the encoder section to adjust the transfer rate from the VLC circuit 7 to the video code buffer 8 so that the video code buffer 21 does not overflow or underflow.
While, for example, in the case of an MPEG, an I picture is inserted at an interval of time of about 0.5 seconds. The amount of data of a P picture or a B picture is much smaller than the amount of data of an I picture. As a result, the amount of data to be transferred to the IVLC circuit 22 at an interval of time of 0.5 seconds will vary periodically. However, since the video code buffer 21 is provided, if the variation of the amount of data per unit time is within the range of the capacity of the video code buffer 21, then it is possible to follow up the variation of the amount of data and consequently, data are supplied to the IVLC circuit 22 regularly.
However, in case, for example, a plurality of complicated screens are to be encoded successively, since the bit rate upon transfer from the VLC circuit 7 is higher, in order to prevent the video code buffer 8 from overflowing, the quantizing step size of the quantizing circuit 6 must be set to a high value, which will result in the problem that the quality of the picture varies.
Thus, it seems a promising solution, for example, to fix the quantizing step size of the quantizing circuit 6 so that a code train at a variable rate output from the VLC circuit 7 is recorded as it is onto the optical disk 16 to achieve uniformity in picture quality. However, if such optical disk 16 is reproduced on the conventional reproducing apparatus, then if decoding of complicated screens continues for several seconds, the video code buffer 21 will underflow. On the other hand, if decoding of simple screens continues, then the video code buffer 21 will overflow. After all, correct reproduction images cannot be obtained.
Further, there is another solution wherein the average bit rate is set in advance to such a high value that the apparatus can cope. For example, with complicated screens. With this solution, however, much data are transferred even for a simple screen, and consequently, the time within which an optical disk can be recorded or reproduced becomes short.
Further, in the conventional apparatus, error correction for data read out from the optical disk 16 is performed by an error correcting circuit (not shown). However, in case a reproduction signal is deteriorated, for example, by dust sticking to the optical disk 16 or the tracking servo is put out of order by mechanical vibrations from the outside, error correction becomes impossible and consequently the picture quality is deteriorated.